package com.qqb.service.impl;

import com.qqb.dao.EduDao;
import com.qqb.pojo.Edu;
import com.qqb.service.EduService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class EduServiceImpl implements EduService {

    @Resource
    private EduDao eduDao;


    @Override
    public List<Edu> findAll() {
        return eduDao.selectAll();
    }

    @Override
    public String findEduNameByCode(String code) {
        Edu edu = new Edu();
        edu.setCode(code);
        Edu one = eduDao.selectOne(edu);
        if (one != null) {
            return one.getEdu();
        } else {
            return "";
        }
    }
}
